<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>单点跳转</title>
<script> 
	localStorage.setItem("token", '${token}');
	localStorage.setItem("sysUser", JSON.stringify(${sysUser}));
	console.log(JSON.stringify(${permiHashMaps}));
	var map = jsonToMap(${permiHashMaps});
	localStorage.setItem("PERMISSIONS",  JSON.stringify(Object.fromEntries(map)));
	window.location.href='sys/default';
	
	function jsonToMap(array) {
		var map = new Map();
		for (var json of array) {
			console.log(json.moduleurl);
			map.set(json.moduleurl, json.PERMISSIONS);
		}
		return map;
	}
</script>
</head>
<body>
</body>
</html>